import request from '@/utils/request'

/**
 *
 * @param {政策管理-暂存} params
 */
export function policyAddOrUpdate (params) {
  return request({
    url: 'website/policy/policyAddOrUpdate',
    method: 'post',
    data: JSON.stringify(params),
    headers: {
      'Content-Type': 'application/json'
    }
  })
}
/**
 *
 * @param {政策管理-发布} params
 */
export function policySendOrBack (params) {
  return request({
    url: '/website/policy/policySendOrBack',
    method: 'post',
    data: JSON.stringify(params),
    headers: {
      'Content-Type': 'application/json'
    }
  })
}
/**
 *
 * @param {政策列表查询} params
 */
export function policyList (params) {
  return request({
    url: 'website/policy/policyList',
    method: 'post',
    data: JSON.stringify(params),
    headers: {
      'Content-Type': 'application/json'
    }
  })
}
/**
 *
 * @param {政策热点列表查询} params
 */
export function policyListOrderByClickNum (params) {
  return request({
    url: '/website/policy/policyListOrderByClickNum',
    method: 'post',
    data: JSON.stringify(params),
    headers: {
      'Content-Type': 'application/json'
    }
  })
}
/**
 *
 * @param {政策详情查看} params
 */
export function policyDetails (params) {
  return request({
    url: 'website/policy/policyDetails',
    method: 'post',
    params
  })
}
/**
 *
 * @param {政策管理-删除} params
 */
export function delPolicy (params) {
  return request({
    url: 'website/policy/delPolicy',
    method: 'post',
    params
  })
}
/**
 *
 * @param {政策类型管理} params
 */
export function addPolicyType (params) {
  return request({
    url: 'website/policyType/addPolicyType',
    method: 'post',
    data: JSON.stringify(params),
    headers: {
      'Content-Type': 'application/json'
    }
  })
}
/**
 *
 * @param {政策类型列表查询} params
 */
export function policyTypeList (params) {
  return request({
    url: 'website/policyType/policyTypeList',
    method: 'post',
    data: JSON.stringify(params),
    headers: {
      'Content-Type': 'application/json'
    }
  })
}

/**
 *
 * @param {政策分类详情} params
 */
export function policyTypeDetails (params) {
  return request({
    url: 'website/policyType/policyTypeDetails',
    method: 'post',
    params
  })
}
/**
 *
 * @param {政策分类删除} params
 */
export function policyTypeDel (params) {
  return request({
    url: 'website/policyType/policyTypeDel',
    method: 'post',
    params
  })
}
